1. Field of the Invention
The invention relates to a communication method for storage devices and, in particular, to a communication method for storage devices on the basis of file access.
2. Related Art
Most of the storage devices are designed according to a standard storage control protocol. Therefore, they only support the basic storage functions. Driven by the market needs and the differences among manufacturers, the hardware is sometimes added with new functions. However, the standard storage control protocol cannot satisfy the requirements of these functions. Thus, nonstandard storage control protocols are defined and introduced by different manufacturers.
Take the flash disk as an example. Since the standard protocol in the operating system is originally defined for basic transmitting and input/output (I/O) functions of files, to add values to the products and for the convenience of users, manufacturers further develop various application programs beyond the basic functions (e.g., the disk encryption function). However, the driver program has to be modified in order to add these nonstandard functions under a nonstandard protocol. This in turn results in the compatibility problem.
FIG. 1 shows a schematic view of a conventional storage device 20 communicating with a computer 10 using a nonstandard control protocol 140. The original storage controller 210 uses the driver program compliant with the standard storage control protocol 130 to communicate with the application program. If some new function needs to be added to the storage controller 210 and part of the hardware design has to be modified, the driver program has to be modified accordingly in order for the function to be used in the application program 110. Since the original standard storage control protocol 130 is not designed with this, a driver program with a nonstandard storage control protocol 140 has to be written for the newly added function on top of the original communication method. When the application program 110 calls for the new function, the task can be achieved using the driver program with the nonstandard storage control protocol 140. An exclusive command pipe is generated to communicate with the storage controller 210.
Suppose the storage device 20 is a flash disk. Through a file system 120, the application program 110 can directly save a file into the memory 220 of the storage device 20 after the file is processed according to the standard storage control protocol 130 and received by the storage controller 210. Using the same method, the file in the memory 220 of the storage device 20 can be read and modified. If the manufacturer wants to add an encryption protection function to the storage device 20, a driver program has to be written for the encryption function in addition to adding a hardware element with the encryption mechanism on the storage controller 210.
Adding some nonstandard storage control protocol 140 to the driver program for the encryption function will enlarge the size of the driver program as well as complicate the application program 110. Since a nonstandard storage control protocol 140 is used, the portability of the product on various kinds of operating systems has to be taken into account. Modifying the driver program for multiple operating systems will greatly increase the development cost and elongate the developing time. Also, subsequent maintenance of the driver program is also a serious problem. Therefore, how to find a most convenient way of modifying the driver program as well as to shorten the developing time is an important issue in the field.